-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OPSIM-1063: Ensure MAF imports without data and that all stackers run #349
Conversation
self.zeropoints = zeropoints | ||
self.km = km | ||
|
||
def _run(self, sim_data, cols_present=False): | ||
if zeropoints is None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs to be self.zeropoints
. That implies there's no unit test coverage of the _run
method.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fun - I added a unit test to run all of the stacker 'run' methods and I'm finding a few others which don't work.
Scope creep, but should be able to fix these.
d6624d3
to
82d7f1d
Compare
The scope of this PR expanded once I added a unit test to make sure that the SaturationStacker ran. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That all looks reasonable.
If load_inst_zeropoints is in init method, then the actual throughput files are attempted to be read as soon as the stacker is instantiated (as in the batches or sometimes in metrics init methods).
Moving the call to load_inst_zeropoints to the
run
method lets rubin_sim import even without data being available, instead of failing to import in that case.